#include "child.h"

int checkValueValue(int value1, int value2){
	if ((value1 - value2) % nBank == 0)
		return YES;
	else return NO;
}

int checkValueNotValue(Reg reg, int os, int value){
	if (reg.coefficient % nBank == 0)
		return checkValueValue(os, value);
	return MAYBE;
}

int checkNotValueNotValue(Reg reg1, int os1, Reg reg2, int os2){
	if (reg1.coefficient % nBank == 0)
		return checkValueNotValue(reg2, os2, os1);
	if (reg2.coefficient % nBank == 0)
		return checkValueNotValue(reg1, os1, os2);
	if (reg1.hash != reg2.hash)
		return MAYBE;
	if (reg1.coefficient % nBank != reg2.coefficient % nBank)
		return MAYBE;
	if ((reg1.delta + os1 - reg2.delta - os2) % nBank == 0)
		return YES;
	else return NO;
}